import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/zhu',
    name: 'Zhu',
    component: () => import('../views/zhu.vue')
  },
  {
    path: '/map',
    name: 'Map',
    component: () => import('../views/Map.vue')
  },
  {
    path: '/kz',
    name: 'Kz',
    component: () => import('../views/Kz.vue')
  },
  {
    path: '/current',
    name: 'Current',
    component: () => import('../views/Current.vue')
  },
  {
    path: '/hosp',
    name: 'Hosp',
    component: () => import('../views/Hosp.vue')
  },
  {
    path: '/realTime',
    name: 'RealTime',
    component: () => import('../views/RealTime.vue')
  },
  {
    path: '/hospMap',
    name: 'HospMap',
    component: () => import('../views/HospMap.vue')
  },
  {
    path: '/hospital',
    name: 'Hospital',
    component: () => import('../views/EpidemicManage/Hospital.vue')
  },
  {
    path: '/infoList',
    name: 'InfoList',
    component: () => import('../views/EpidemicManage/InfoList.vue')
  },
  {
    path: '/up',
    name: 'Up',
    component: () => import('../views/Up.vue')
  },
  {
    path: '/role',
    name: 'Role',
    component: () => import('../views/Role.vue')
  },
  {
    path: '/list',
    name: 'List',
    component: () => import('../views/List.vue')
  },
  {
    path: '/echart',
    name: 'Echart',
    component: () => import('../views/Echart.vue')
  },
  {
    path: '/drawlist',
    name: 'Drawlist',
    component: () => import('../views/Drawlist.vue')
  },
  {
    path: '/user',
    name: 'User',
    component: () => import('../views/User.vue')
  },
  {
    path: '/article',
    name: 'Article',
    component: () => import('../views/EpidemicManage/article.vue')
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import('../views/About.vue')
  }
]

const router = new VueRouter({
  // mode: 'history',
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
